package com.example.juheweixin;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MyWebView extends Activity{
	private WebView mWebView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.view_web);
		String url = getIntent().getStringExtra("url");
		mWebView = (WebView) findViewById(R.id.web);
		WebSettings settings = mWebView.getSettings();
    	settings.setBuiltInZoomControls(false);
    	settings.setJavaScriptEnabled(true);
		mWebView.setWebViewClient(mWebViewClient);
		mWebView.loadUrl(url);
	}
	
	private WebViewClient mWebViewClient = new WebViewClient(){
		public boolean shouldOverrideUrlLoading(WebView view, String url) {  
			view.loadUrl(url);   
			return true;       
		}       
		
		public void onPageFinished(WebView view, String url) {
		}
		
		public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
		}
	};

}
